<?php 
class FileHelper extends CFileHelper {
	
	public static function mkdir($dir, $mode = 0777, $makeindex = TRUE){
		if(!is_dir($dir)) {
			self::mkdir(dirname($dir), $mode, $makeindex);
			@mkdir($dir, $mode);
			if(!empty($makeindex)) {
				@touch($dir.'/index.html'); @chmod($dir.'/index.html', 0777);
			}
		}
		return true;
	}
	
	public static function isImage($name){
		$ext = self::getExtension($name);
		return in_array($ext, array('jpeg', 'jpg', 'gif', 'png', 'bmp')); 
	}
}

?>